package com.leyou.user.service.mapper;

import com.leyou.common.bean.IBaseMapper;
import com.leyou.user.inter.pojo.User;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;

public interface UserMapper extends IBaseMapper<User> {

    @Insert("INSERT INTO tb_user_role(user_id, role_id) VALUES (#{uid},#{rid})")
    int insertUserAndRole(@Param("uid") Long uid, @Param("rid") Long rid);

    @Delete("DELETE from tb_user_role where user_id = #{uid}")
    int deleteUserAndRole(@Param("uid") Long uid);
}